package ma.co.ba.BusinessApplications.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "TYPE_MISSION")
public class TypeMission implements Serializable{

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;

	@Column(name = "intitule", length = 200)
	private String intitule_type_mission;

	@OneToMany(mappedBy = "typeMission", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private List<NatueMission> natureMission;

	@OneToMany(mappedBy = "typeMission", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private List<Mission> missions;

	/**
	 * @return the intitule_type_mission
	 */
	public String getIntitule_type_mission() {
		return intitule_type_mission;
	}

	/**
	 * @param intitule_type_mission
	 *            the intitule_type_mission to set
	 */
	public void setIntitule_type_mission(String intitule_type_mission) {
		this.intitule_type_mission = intitule_type_mission;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the natureMission
	 */
	public List<NatueMission> getNatureMission() {
		return natureMission;
	}

	/**
	 * @param natureMission the natureMission to set
	 */
	public void setNatureMission(List<NatueMission> natureMission) {
		this.natureMission = natureMission;
	}

	/**
	 * @return the missions
	 */
	public List<Mission> getMissions() {
		return missions;
	}

	/**
	 * @param missions the missions to set
	 */
	public void setMissions(List<Mission> missions) {
		this.missions = missions;
	}

	
	
}
